# coding=utf-8
# @Time: 2023/2/23 14:26
# @Author: zyg
# email: zhaoyiguang@lecent.cn

class RegisterBase:
    def register_input(self, input_placeholder):
        """
        注册输入框
        :param input_placeholder:
        :return:
        """
        return "//input[@placeholder='" + input_placeholder + "']"

    def register_radio_box(self, radio_value):
        return "//input[@value='" + radio_value + "']/parent::span"

    def register_button(self, button_name):
        """
        点击注册按钮
        :param button_name:
        :return:
        """
        # return "//span[text()='" + button_name + "']/parent::button"
        return "//span[text()='" + button_name + "']/parent::button"


if __name__ == '__main__':
    print(RegisterBase().register_input("用户名"))
    print(RegisterBase().register_input("密码"))
    print(RegisterBase().register_input("邮箱"))
    print(RegisterBase().register_input("手机号"))
    print(RegisterBase().register_radio_box("女"))
    print(RegisterBase().register_button("注册"))
